
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GL] Value of GL_PIXEL_COUNTER_BITS_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public const int PIXEL_COUNTER_BITS_NV = 0x8864;

		/// <summary>
		/// [GL] Value of GL_CURRENT_OCCLUSION_QUERY_ID_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public const int CURRENT_OCCLUSION_QUERY_ID_NV = 0x8865;

		/// <summary>
		/// [GL] Value of GL_PIXEL_COUNT_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public const int PIXEL_COUNT_NV = 0x8866;

		/// <summary>
		/// [GL] Value of GL_PIXEL_COUNT_AVAILABLE_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public const int PIXEL_COUNT_AVAILABLE_NV = 0x8867;

		/// <summary>
		/// [GL] glGenOcclusionQueriesNV: Binding for glGenOcclusionQueriesNV.
		/// </summary>
		/// <param name="ids">
		/// A <see cref="T:uint[]"/>.
		/// </param>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public static void GenOcclusionQueriesNV(uint[] ids)
		{
			unsafe {
				fixed (uint* p_ids = ids)
				{
					Debug.Assert(Delegates.pglGenOcclusionQueriesNV != null, "pglGenOcclusionQueriesNV not implemented");
					Delegates.pglGenOcclusionQueriesNV(ids.Length, p_ids);
					LogCommand("glGenOcclusionQueriesNV", null, ids.Length, ids					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glGenOcclusionQueriesNV: Binding for glGenOcclusionQueriesNV.
		/// </summary>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public static uint GenOcclusionQueryNV()
		{
			uint retValue;
			unsafe {
				Delegates.pglGenOcclusionQueriesNV(1, &retValue);
				LogCommand("glGenOcclusionQueriesNV", null, 1, "{ " + retValue + " }"				);
			}
			DebugCheckErrors(null);
			return (retValue);
		}

		/// <summary>
		/// [GL] glDeleteOcclusionQueriesNV: Binding for glDeleteOcclusionQueriesNV.
		/// </summary>
		/// <param name="ids">
		/// A <see cref="T:uint[]"/>.
		/// </param>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public static void DeleteOcclusionQueriesNV(params uint[] ids)
		{
			unsafe {
				fixed (uint* p_ids = ids)
				{
					Debug.Assert(Delegates.pglDeleteOcclusionQueriesNV != null, "pglDeleteOcclusionQueriesNV not implemented");
					Delegates.pglDeleteOcclusionQueriesNV(ids.Length, p_ids);
					LogCommand("glDeleteOcclusionQueriesNV", null, ids.Length, ids					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glIsOcclusionQueryNV: Binding for glIsOcclusionQueryNV.
		/// </summary>
		/// <param name="id">
		/// A <see cref="T:uint"/>.
		/// </param>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public static bool IsOcclusionQueryNV(uint id)
		{
			bool retValue;

			Debug.Assert(Delegates.pglIsOcclusionQueryNV != null, "pglIsOcclusionQueryNV not implemented");
			retValue = Delegates.pglIsOcclusionQueryNV(id);
			LogCommand("glIsOcclusionQueryNV", retValue, id			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [GL] glBeginOcclusionQueryNV: Binding for glBeginOcclusionQueryNV.
		/// </summary>
		/// <param name="id">
		/// A <see cref="T:uint"/>.
		/// </param>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public static void BeginOcclusionQueryNV(uint id)
		{
			Debug.Assert(Delegates.pglBeginOcclusionQueryNV != null, "pglBeginOcclusionQueryNV not implemented");
			Delegates.pglBeginOcclusionQueryNV(id);
			LogCommand("glBeginOcclusionQueryNV", null, id			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glEndOcclusionQueryNV: Binding for glEndOcclusionQueryNV.
		/// </summary>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public static void EndOcclusionQueryNV()
		{
			Debug.Assert(Delegates.pglEndOcclusionQueryNV != null, "pglEndOcclusionQueryNV not implemented");
			Delegates.pglEndOcclusionQueryNV();
			LogCommand("glEndOcclusionQueryNV", null			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glGetOcclusionQueryivNV: Binding for glGetOcclusionQueryivNV.
		/// </summary>
		/// <param name="id">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="pname">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="params">
		/// A <see cref="T:int[]"/>.
		/// </param>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public static void GetOcclusionQueryNV(uint id, int pname, [Out] int[] @params)
		{
			unsafe {
				fixed (int* p_params = @params)
				{
					Debug.Assert(Delegates.pglGetOcclusionQueryivNV != null, "pglGetOcclusionQueryivNV not implemented");
					Delegates.pglGetOcclusionQueryivNV(id, pname, p_params);
					LogCommand("glGetOcclusionQueryivNV", null, id, pname, @params					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glGetOcclusionQueryuivNV: Binding for glGetOcclusionQueryuivNV.
		/// </summary>
		/// <param name="id">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="pname">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="params">
		/// A <see cref="T:uint[]"/>.
		/// </param>
		[RequiredByFeature("GL_NV_occlusion_query")]
		public static void GetOcclusionQueryuivNV(uint id, int pname, [Out] uint[] @params)
		{
			unsafe {
				fixed (uint* p_params = @params)
				{
					Debug.Assert(Delegates.pglGetOcclusionQueryuivNV != null, "pglGetOcclusionQueryuivNV not implemented");
					Delegates.pglGetOcclusionQueryuivNV(id, pname, p_params);
					LogCommand("glGetOcclusionQueryuivNV", null, id, pname, @params					);
				}
			}
			DebugCheckErrors(null);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_NV_occlusion_query")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glGenOcclusionQueriesNV(int n, uint* ids);

			[RequiredByFeature("GL_NV_occlusion_query")]
			[ThreadStatic]
			internal static glGenOcclusionQueriesNV pglGenOcclusionQueriesNV;

			[RequiredByFeature("GL_NV_occlusion_query")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDeleteOcclusionQueriesNV(int n, uint* ids);

			[RequiredByFeature("GL_NV_occlusion_query")]
			[ThreadStatic]
			internal static glDeleteOcclusionQueriesNV pglDeleteOcclusionQueriesNV;

			[RequiredByFeature("GL_NV_occlusion_query")]
			[SuppressUnmanagedCodeSecurity]
			[return: MarshalAs(UnmanagedType.I1)]
			internal delegate bool glIsOcclusionQueryNV(uint id);

			[RequiredByFeature("GL_NV_occlusion_query")]
			[ThreadStatic]
			internal static glIsOcclusionQueryNV pglIsOcclusionQueryNV;

			[RequiredByFeature("GL_NV_occlusion_query")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glBeginOcclusionQueryNV(uint id);

			[RequiredByFeature("GL_NV_occlusion_query")]
			[ThreadStatic]
			internal static glBeginOcclusionQueryNV pglBeginOcclusionQueryNV;

			[RequiredByFeature("GL_NV_occlusion_query")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glEndOcclusionQueryNV();

			[RequiredByFeature("GL_NV_occlusion_query")]
			[ThreadStatic]
			internal static glEndOcclusionQueryNV pglEndOcclusionQueryNV;

			[RequiredByFeature("GL_NV_occlusion_query")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glGetOcclusionQueryivNV(uint id, int pname, int* @params);

			[RequiredByFeature("GL_NV_occlusion_query")]
			[ThreadStatic]
			internal static glGetOcclusionQueryivNV pglGetOcclusionQueryivNV;

			[RequiredByFeature("GL_NV_occlusion_query")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glGetOcclusionQueryuivNV(uint id, int pname, uint* @params);

			[RequiredByFeature("GL_NV_occlusion_query")]
			[ThreadStatic]
			internal static glGetOcclusionQueryuivNV pglGetOcclusionQueryuivNV;

		}
	}

}
